﻿using EntityFramework.Data.Core;
using Framework.IOC;
using IRepositories.Core;

namespace Repositories.Test.Service
{
    public class ServiceBase
    {

        public ServiceBase()
        {
            ServiceLocator.Regist(container =>
            {
                container.RegisterType(typeof(IUnitOfWork), typeof(TestEFDbContext));
                //container.RegisterType(typeof(IEFRepository<>), typeof(EFRepository<>));
                //container.AddNewExtension<Interception>();
                container.RegisterType(typeof(IEFRepository<>), typeof(EFRepository<>), new InterceptionArguments<LoggingBehavior>(), new InterceptionArguments<TempBehavior>());
                //container.RegisterType<IUserService, UserService>(new Interceptor<InterfaceInterceptor>(), new InterceptionBehavior<LoggingBehavior>());

            });
        }

    }
}
